﻿@model EM.OA.Portal.Models.FixedAssetsModels
@{
    Layout = "~/Views/Shared/_LayoutContent.cshtml";
}
<script type="text/javascript" src="~/Scripts/page/FixedAssets/FixedAssets.js"></script>
<div>
    <div class="easyui-layout" style="height: 500px;">
        @*Left*@
        <div data-options="region:'west',split:true" title="固定资产类型" style="width: 150px;">
            <ul class="easyui-tree" id="tt"></ul>
        </div>
        <div data-options="region:'center',title:''">

            @*list*@
            <table id="list" class="easyui-datagrid" toolbar="#toolbar">
            </table>
            <div id="toolbar">
                <a href="#" class="easyui-linkbutton" iconcls="icon-add" plain="true" onclick="add()">增加</a>
                <a href="#" class="easyui-linkbutton" iconcls="icon-edit" plain="true" onclick="edit()">修改</a>
                <a href="#" class="easyui-linkbutton" iconcls="icon-remove" plain="true" onclick="del()">删除</a>
                <div id="tb" style="padding: 3px">
                    <span>@Html.LabelFor(m => m.FixedAssetsName)</span>
                    @Html.TextBoxFor(m => m.FixedAssetsName, new { @class = "easyui-validatebox" })
                    <a href="#" class="easyui-linkbutton" iconcls="icon-search" plain="true" onclick="doSearch()">查询</a>
                </div>
            </div>
        </div>
        @*Detail*@
        <div id="dlg" class="easyui-dialog" style="width: 580px; height: 470px; padding: 10px 20px"
            closed="true" buttons="#dlg-buttons" modal="true" resizable="true">
            <div id="dlg-buttons">
                <a href="#" class="easyui-linkbutton" iconcls="icon-ok" onclick="save()">保存</a>
                <a href="#" class="easyui-linkbutton" iconcls="icon-cancel" onclick="javascript:$('#dlg').dialog('close')">取消</a>
            </div>
            <form id="fm" method="post">
                @Html.HiddenFor(m => m.FixedAssetsID)
                <table>
                    <tr>
                        <td style="text-align: right;">@Html.LabelFor(m => m.FixedAssetsCode)</td>
                        <td>@Html.TextBoxFor(m => m.FixedAssetsCode, new { @class = "easyui-validatebox", @required = "true", @validType = "length[1,100]" })</td>
                        <td style="text-align: right;">@Html.LabelFor(m => m.FixedAssetsName)	</td>
                        <td>@Html.TextBoxFor(m => m.FixedAssetsName, new { @class = "easyui-validatebox", @required = "true", @validType = "length[1,100]" })</td>
                    </tr>
                    <tr>
                        <td style="text-align: right;">@Html.Label("所属部门")</td>
                        <td>
                            <input type="hidden" id="DepartmentID" name="DepartmentID" />
                            <input class="easyui-validatebox" type="text" id="DepartmentIDName" name="DepartmentIDName" data-options="required:true" /><a href="#" class="easyui-linkbutton" iconcls="icon-search" onclick="GetUserList()" plain="true">选择</a>

                        </td>
                        <td style="text-align: right;">@Html.LabelFor(m=>m.DictionaryKind)</td>
                        <td>@Html.DropDownListFor(m => m.DictionaryKind, new EM.OA.WebCommon.Base.BaseViewModel().GetListItems("FixedAssetsKind"), new { @class = "easyui-combobox", @required = "true" })</td>
                    </tr>
                    <tr>
                        <td style="text-align: right;">@Html.LabelFor(m => m.Manufacturers)</td>
                        <td>@Html.TextBoxFor(m => m.Manufacturers, new { @class = "easyui-validatebox", @required = "true", @validType = "length[1,200]" })</td>
                        <td style="text-align: right;">@Html.LabelFor(m => m.ProductionDateTime)</td>
                        <td>
                            <input name="ProductionDateTime" class="easyui-datebox" data-options="required:true" /></td>
                    </tr>
                    <tr>
                        <td style="text-align: right;">@Html.LabelFor(m => m.PurchaseDateTime)	</td>
                        <td>@Html.TextBoxFor(m => m.PurchaseDateTime, new { @class = "easyui-datebox", @required = "true" })</td>
                        <td style="text-align: right;">@Html.LabelFor(m => m.EnableDateTime)</td>
                        <td>@Html.TextBoxFor(m => m.EnableDateTime, new { @class = "easyui-datebox", @required = "true" })</td>
                    </tr>
                    <tr>
                        <td style="text-align: right;">@Html.LabelFor(m => m.OriginalValue)</td>
                        <td>@Html.TextBoxFor(m => m.OriginalValue, new { @class = "easyui-validatebox", @required = "true" })</td>
                        <td style="text-align: right;">@Html.LabelFor(m => m.ScrapValue)</td>
                        <td>@Html.TextBoxFor(m => m.ScrapValue, new { @class = "easyui-validatebox", @required = "true" })</td>
                    </tr>
                    <tr>
                        <td style="text-align: right;">@Html.LabelFor(m => m.DepreciationLlife)</td>
                        <td>@Html.TextBoxFor(m => m.DepreciationLlife, new { @class = "easyui-validatebox", @required = "true" })</td>
                        <td style="text-align: right;">@Html.LabelFor(m => m.AccumulatedDepreciation)</td>
                        <td>@Html.TextBoxFor(m => m.AccumulatedDepreciation, new { @class = "easyui-validatebox", @required = "true" })</td>
                    </tr>
                    <tr>
                        <td style="text-align: right;">@Html.LabelFor(m => m.Location)</td>
                        <td>@Html.TextBoxFor(m => m.AccumulatedDepreciation, new { @class = "easyui-validatebox", @required = "true", @validType = "length[1,500]" })</td>
                        <td style="text-align: right;">@Html.LabelFor(m => m.Status)</td>
                        <td>
                            <select id="Status" name="Status" class="easyui-combobox" data-options="panelHeight:'auto'">
                                <option value="0">未使用</option>
                                <option value="1">使用中</option>
                                <option value="2">已提足折旧</option>
                            </select>
                        </td>
                    </tr>
                    <tr>
                        <td style="text-align: right;">@Html.LabelFor(m => m.ManageUserID)</td>
                        <td>
                            <input type="hidden" id="ManageUserID" name="ManageUserID" />
                            <input class="easyui-validatebox" type="text" id="ManageUserIDName" name="ManageUserIDName" data-options="required:true" /><a href="#" class="easyui-linkbutton" iconcls="icon-search" onclick="GetUserList()" plain="true">选择</a></td>
                        <td></td>
                        <td></td>
                    </tr>
                    <tr>
                        <td style="text-align: right;">@Html.LabelFor(m => m.Remark)</td>
                        <td colspan="3">@Html.TextAreaFor(m => m.Remark, new { @style = "width:100%", @cols = "50", @rows = "10", @class = "easyui-validatebox", @required = "true", @validType = "length[1,1000]" })</td>
                    </tr>
                </table>
            </form>
        </div>

    </div>
</div>
@Html.Partial("_OrgUserPartial", new List<object> { true, "ManageUserID", "ManageUserIDName" })
